#include "hash.h"

unsigned int calc_hash(const unsigned char *str, int len)
{
    int n = len;
    unsigned int r = 0;
    while(n--)
        r = HT_HASHSTEP(r, *str++);
    return HT_HASHFINISH(r, len);
}

